/**
 * Created With IntelliJ IDEA
 * Description:牛客网：BM63 跳台阶
 * https://www.nowcoder.com/practice/8c82a5b80378478f9484d87d1c5f12a4?tpId=295&tqId=23261&ru=/exam/oj&qru=/ta/format-top101/question-ranking&sourceUrl=%2Fexam%2Foj
 * User: DELL
 * Data: 2022-11-04
 * Time: 13:27
 */
public class Solution {
    public int jumpFloor(int target) {
        if (target == 1) {
            return 1;
        }
        int tmp = 0;
        int a = 1;
        int b = 1;
        for (int i = 2; i <= target; i++) {
            tmp = a + b;
            a = b;
            b = tmp;
        }
        return tmp;
    }
}
